﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../MasterPage.Master" 
    CodeBehind="wfAutorizacionOC.aspx.cs" Inherits="CO.WfAutorizacionOC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
   
    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>
    
    <script  src="script/jquery-latest.js" type="text/javascript"></script>
    <script  src="script/jquery.tablesorter.js" type="text/javascript" ></script>

    <script  src="script/jquery-1.3.2.min.js" type="text/javascript"></script>
    <link href="DataTable/media/css/demo_page.css" rel="stylesheet" />
    <link href="DataTable/media/css/demo_table_jui.css" rel="stylesheet" />

    <link href="DataTable/examples/examples_support/themes/cupertino/jquery-ui-1.10.3.custom.css" rel="stylesheet" />
    <link href="../Styles/General.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>

    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>

    <script src="../Scripts/jquery.MetaData.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.dataTables.min.js" type="text/javascript"></script>

<%--    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>
   
    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>


    <script  src="script/jquery-latest.js" type="text/javascript"></script>
    <script  src="script/jquery.tablesorter.js" type="text/javascript" ></script>

    <script  src="script/jquery-1.3.2.min.js" type="text/javascript"></script>
    <link href="DataTable/media/css/demo_page.css" rel="stylesheet" />
    <link href="DataTable/media/css/demo_table_jui.css" rel="stylesheet" />

    <link href="DataTable/examples/examples_support/themes/cupertino/jquery-ui-1.10.3.custom.css" rel="stylesheet" />
    <link href="../Styles/General.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />

    <script src="../Scripts/jquery.min.js" type="text/javascript"></script>

    <script src="../Scripts/jquery.tokeninput.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.purr.js" type="text/javascript"></script>
    <script src="../Scripts/General.js" type="text/javascript"></script>

    <script src="../Scripts/jquery.MetaData.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.dataTables.min.js" type="text/javascript"></script>
--%>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   <input id="dummy" type="button" style="display: none" runat="server" />
   <asp:UpdatePanel ID="udpInnerUpdatePanel" runat="Server" UpdateMode="Conditional">
      <ContentTemplate>
        <table width="100%" cellpadding="0" cellspacing="2">
            <tr>
                <td colspan="3">
                    <div class="modalPopupHeader">
                        <asp:Label ID="lblTitlePopup" runat="server"></asp:Label>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                <td>
                    <table width="100%" cellpadding="0" cellspacing="2">
                        <tr>
                            <td>
                                <div style="border: 1px solid #ccc; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -ms-border-radius: 5px;">
                                    <table width="100%" cellpadding="0" cellspacing="2">
                                        <tr>
                                            <td style="width: 5px;">
                                                &nbsp;
                                            </td>
                                            <td class="style22">
                                                Fecha Inicio
                                            </td>
                                            <td class="style27">
                                                <esd:esdDateTextBox ID="ucControlFecha1" runat="server" />
                                            </td>
                                            <td style="margin-left: 40px;" class="style16">
                                                <asp:TextBox ID="TextBox1" runat="server" BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style26">
                                                <asp:CheckBox ID="chkPendiente" runat="server" Text="Pendiente" />
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td style="width: 10px;">
                                                Planta
                                            </td>
                                            <td class="style30">
                                                <asp:DropDownList ID="dbPlanta" runat="server" Width="200px" AutoPostBack="True"></asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:Button ID="btnBuscar3" runat="server" CssClass="esdButtonStyle" onclick="btnBuscar3_Click" Text="Buscar" Width="80px" />
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td style="width: 5px;">
                                                <asp:Button ID="btnBuscar" runat="server" CssClass="esdButtonStyle" Text="Autorizar" Width="80px" onclick="btnBuscar_Click" />
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="style4">
                                            </td>
                                            <td class="style20">
                                                Fecha Fin
                                            </td>
                                            <td class="style28">
                                                <esd:esdDateTextBox ID="ucControlFecha2" runat="server" />
                                            </td>
                                            <td class="style16" style="margin-left: 40px;">
                                                <asp:TextBox ID="TextBox2" runat="server" BackColor="#CCCCCC" BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style13">
                                                <asp:CheckBox ID="chk_nAutoriza" runat="server" Text="No autorizar" />
                                            </td>
                                            <td class="style5">
                                                &nbsp;
                                            </td>
                                            <td class="style6">
                                                &nbsp;
                                            </td>
                                            <td class="style5" colspan="2">
                                                &nbsp;
                                            </td>
                                            <td class="style5">
                                                &nbsp;
                                            </td>
                                            <td class="style4">
                                                <asp:Button ID="btnBuscar0" runat="server" CssClass="esdButtonStyle" Text="No Autorizar" Width="80px" onclick="btnBuscar0_Click" />
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="style1">
                                                &nbsp;
                                            </td>
                                            <td class="style21">
                                                &nbsp;
                                            </td>
                                            <td class="style29">
                                                &nbsp;
                                            </td>
                                            <td class="style16" style="margin-left: 40px;">
                                                <asp:TextBox ID="TextBox3" runat="server" BackColor="#FFCC99" BorderStyle="None" Enabled="False" Height="15px" Width="20px"></asp:TextBox>
                                            </td>
                                            <td class="style14">
                                                <asp:CheckBox ID="chkAutoriza" runat="server" Text="Autorizadas" />
                                            </td>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style3">
                                                &nbsp;
                                            </td>
                                            <td class="style2" colspan="2">
                                                &nbsp;
                                            </td>
                                            <td class="style2">
                                                &nbsp;
                                            </td>
                                            <td class="style1">
                                                <asp:Button ID="btnBuscar1" runat="server" CssClass="esdButtonStyle" Text="Habilitar" Width="80px"  />
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td style="width: 5px;">
                                                &nbsp;</td>
                                            <td class="style22">
                                                &nbsp;</td>
                                            <td class="style27">
                                                <asp:Button ID="btnActualizar" runat="server" CssClass="esdButtonStyle" Text="Actualizar" Width="80px" onclick="btnActualizar_Click" />
                                            </td>
                                            <td class="style16">
                                                &nbsp;
                                            </td>
                                            <td class="style26">
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td style="width: 10px;">
                                                &nbsp;
                                            </td>
                                            <td colspan="2">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                            <td style="width: 5px;">
                                                <asp:Button ID="btnBuscar2" runat="server" CssClass="esdButtonStyle" Text="Salir" Width="80px" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        
                        <tr align="center">
                            <td>
                                <table cellpadding="0" cellspacing="2" width="100%">
                                    <tr>
                                        <td>
                                            <div style="width: 100%; clear:both; overflow:auto; height:1%; display:inline-block">
                                                <div class="DataDetail" aria-multiline="True" >
                                                    <asp:GridView ID="gvListar" runat="server" CssClass="grid sortable {disableSortCols: [4]}"  ScrollBars="Auto" ScrollWidth="100%" Width="100%" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True"  AllowSorting="True">
                                                        <AlternatingRowStyle CssClass="esdGridAlternativeRowStyle" />
                                                        <Columns>
                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("id_periodo") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="#O/C">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblId_Ordenco" runat="server" Text='<%# Bind("id_ordenco") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Origen OC">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("origen") %>' ></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="#Conso/Req">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("consoreq") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="#Cotizacion">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label5" runat="server" Text='<%# Bind("cotiza") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Condición">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label6" runat="server" Text='<%# Bind("ds_condpago") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Proveedor">  
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label7" runat="server" Text='<%# Bind("ds_raznombre") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label8" runat="server" Text='<%# Bind("fe_ordenco") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label9" runat="server" Text='<%# Bind("id_importa") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Fecha">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label10" runat="server" Text='<%# Bind("fe_entrega") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label11" runat="server" Text='<%# Bind("id_local") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Pedido En">            
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label12" runat="server" Text='<%# Bind("plantaent") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Emitido Por">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label17" runat="server" Text='<%# Bind("emitidap") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label13" runat="server" Text='<%# Bind("id_personal") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label14" runat="server" Text='<%# Bind("pedidop") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                                
                                                            <asp:TemplateField HeaderText="Entregar En">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label15" runat="server" Text='<%# Bind("plantapedido") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label16" runat="server" Text='<%# Bind("id_personal2") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Prioridad">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label18" runat="server" Text='<%# Bind("priorid") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Monto">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label19" runat="server" Text='<%# Bind("mt_total") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                    <ItemTemplate>
                                                                    <asp:Label ID="Label20" runat="server" Text='<%# Bind("id_modcomp") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Mod.Compra">
                                                                    <ItemTemplate>
                                                                    <asp:Label ID="Label21" runat="server" Text='<%# Bind("modcomp") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label22" runat="server" Text='<%# Bind("tipocomp") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Mnda">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label23" runat="server" Text='<%# Bind("moneda") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField HeaderText="Autorizado Por">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label24" runat="server" Text='<%# Bind("autorizapor") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="False">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="Label25" runat="server" Text='<%# Bind("st_ordenco") %>'></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                            <asp:TemplateField Visible="true">
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkBxSelect" runat="server" Text=" " />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                                        </Columns>
                                                        <HeaderStyle CssClass="esdGridHeaderStyle" />
                                                            <PagerStyle CssClass="gridPagerStyle" />
                                                            <RowStyle CssClass="esdGridRowStyle" />
                                                            <SelectedRowStyle CssClass="esdGridSelectedRowStyle" />
                                                            <EmptyDataTemplate>
                                                            <div id="gridempty">
                                                                <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                                                                &nbsp;No existen registros para esta solicitud.
                                                            </div>
                                                        </EmptyDataTemplate>
                                                    </asp:GridView>
                                                        <input id="hiddenInitialNoOfPageLoad" type="hidden" value="0" runat="server" />
                                                        <input id="hiddenTotalRecords" type="hidden" value="0" runat="server" />
                                                        <input id="hiddenPageRecordCount" type="hidden" value="0" runat="server" />
                                                        <input id="hiddenSortExpression" type="hidden" value="0" runat="server" />
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
      </ContentTemplate>
   </asp:UpdatePanel>
   <asp:HiddenField ID="hdnidCliProv" runat="server" />
</asp:Content>
